//这个模块主要获取的是品牌管理的数据的模块
import requests from "@/utils/request"; 
//获取品牌列表接口
// /admin/product/baseTrademark/{page}/{limit}
export const reqTrademarkList 
= (page, limit) => 
requests({ url: `/admin/product/baseTrademark/${page}/${limit}     
`, method: 'get' });    

// 处理添加品牌
///admin/product/baseTrademark/save
//新增品牌，给武器传递数据 不用传递ID

//修改品牌 ， /admin/product/baseTrademark/update
//修改品牌需要 传递单个ID

export const reqAddOrUpdateTradeMark = (tradeMark) => {
    //带给服务器数据携带 ID ---修改
    if(tradeMark.id){
        return requests({url:'/admin/product/baseTrademark/update', method:'put', data:tradeMark})//修改品牌            ;
    }else{
        return requests({url:'/admin/product/baseTrademark/save', method:'post', data:tradeMark})//添加品牌                 
    }
}

//删除
///admin/product/baseTrademark/remove/{id}
export const reqDeleteTradeMark = (id) =>
requests({url:`/admin/product/baseTrademark/remove/${id}`, 
method:'delete'})

